Software tests are sometimes meant to exercise particular portions of a target program, and sometimes they are meant to exercise most or even all portions of the target. Either way, it is often helpful to have an automatically created report that describes which portion(s) of the target were actually executed during the test(s). Such a report is called a “code coverage” report. A code coverage report may be part of a profile of the target, although “profile” sometimes refers instead or in addition to other measures such as those measuring computational and memory resources consumed during a test.
To assist program development, code coverage reports are often given in terms of source code. For example, a code coverage report may specify which program elements of a target's source code were reached during testing. Code coverage may be reported in terms of program elements such as which functions or other routines were called, which statements were executed, which flow control paths were followed, which conditional expressions were evaluated, and/or which lines of source code were reached. It is understood that these program elements are interrelated and overlap one another in some ways, e.g., a line of source may contain part of a statement, a complete statement, or several statements. Similarly, knowing that particular statement(s) or lines within a conditional flow statement were executed often specifies as well which flow control paths were followed and to some extent which conditional expressions were evaluated.